package com.jjong.model;

import java.util.ArrayList;
import java.util.List;

import org.eclipse.jdt.internal.compiler.ast.MagicLiteral;

import com.jjong.dto.BoardDto;
import com.jjong.dto.FrequestDto;
import com.jjong.dto.FriShowDto;
import com.jjong.dto.FriendDto;
import com.jjong.dto.MembersDto;
import com.jjong.dto.MessageDto;
import com.jjong.dto.OtherMemDto;
import com.jjong.dto.PhotosDto;
import com.jjong.dto.WriteBoardDto;

public class JjongBoardService implements IjjongBoard{
	private static JjongBoardService jjongBoardService;
	
	private JjongBoardManager manager;
	public JjongBoardService(){
		manager = new JjongBoardManager();
	}
	
	public static JjongBoardService getInstance(){
		if(jjongBoardService==null){
			jjongBoardService = new JjongBoardService();
		}
		return jjongBoardService;
	}

	@Override
	public int addMembers(MembersDto dto) {
		return manager.addMembers(dto);
	}

	@Override
	public MembersDto loginMembers(MembersDto dto) {
		return manager.loginMembers(dto);
	}

	@Override
	public int writeprofile(MembersDto dto) {
		return manager.writeprofile(dto);
	}

	@Override
	public MembersDto getJjongUser(String email) {
		return manager.getJjongUser(email);
	}

	@Override
	public int deleteUser(MembersDto dto) {
		return manager.deleteUser(dto);
	}

	@Override
	public ArrayList<MembersDto> memsearch(String name) {
		return manager.memsearch(name);
	}
	@Override
	public ArrayList<BoardDto> getAllBoards() {
		return manager.getAllBoards();
	}

	@Override
	public int writeBoard(WriteBoardDto dto) {
		return manager.writeBoard(dto);
	}

	@Override
	public ArrayList<BoardDto> getUserBoards(String email) {
		return manager.getUserBoards(email);
	}
	
	@Override
	public ArrayList<BoardDto> getUserBoardsPage(String email, int page) {
		return manager.getUserBoardsPage(email,page);
	}

	@Override
	public BoardDto getBoard(int boardseq) {
		return manager.getBoard(boardseq);
	}

	@Override
	public int reply(WriteBoardDto dto) {
		return manager.reply(dto);
	}

	@Override
	public int addFile(MembersDto mDto) {
		return  manager.addFile(mDto);
	}

	@Override
	public MembersDto findpasswd(String email) {
		return manager.findpasswd(email);
	}

	@Override
	public OtherMemDto memfind(int memseq) {
		return manager.memfind(memseq);
	}

	@Override
	public ArrayList<PhotosDto> getPhotoList(String email) {
		return manager.getPhotoList(email);
	}

	@Override
	public int reply2(WriteBoardDto dto) {
		return manager.reply2(dto);
	}

	@Override
	public int delBoard(int boardseq) {
		return manager.delBoard(boardseq);
	}

	@Override
	public int frequest(FrequestDto fdto) {
		return manager.frequest(fdto);
	}

	@Override
	public ArrayList<FriShowDto> fRequestList(String email) {
		return manager.fRequestList(email);
	}
	
	@Override
	public ArrayList<FriShowDto> fRequestListPage(String email ,int page) {
		return manager.fRequestListPage(email,page);
	}

	@Override
	public FrequestDto getFriendReq(FrequestDto fdto) {
		return manager.getFriendReq(fdto);
	}

	@Override
	public int friendAccept(FrequestDto fdto) {
		return manager.friendAccept(fdto);
	}

	@Override
	public int friAcceptAfter(FrequestDto fdto) {
		return manager.friAcceptAfter(fdto);
	}

	@Override
	public ArrayList<FriendDto> friendList(String email) {
		return manager.friendList(email);
	}
	
//	@Override
//	public ArrayList<FriendDto> friendListPage(String email, int page) {
//		return manager.friendListPage(email,page);
//	}

	@Override
	public int reqCheck(FrequestDto fdto) {
		return manager.reqCheck(fdto);
	}

	@Override
	public int fReqRefuse(FrequestDto fdto) {
		return manager.fReqRefuse(fdto);
	}


	@Override
	public int getCount(String email) {
		return manager.getCount(email);
	}

	@Override
	public int getCountFriend(String email) {
		return manager.getCountFriend(email);
	}

	@Override
	public int getCountUserBoard(String email) {
		return manager.getCountUserBoard(email);
	}



	@Override
	public int friDelete(FrequestDto fdto) {
		return manager.friDelete(fdto);
	}

	@Override
	public int friDelete2(FrequestDto fdto) {
		return manager.friDelete2(fdto);
	}

	
	
	
	
	
	
	@Override
	public ArrayList<BoardDto> getOurBoard(String email) {
		return manager.getOurBoard(email);
	}
	
	@Override
	public ArrayList<BoardDto> getOurBoardPage(String email, int page) {
		return manager.getOurBoardPage(email,page);
	}


	@Override
	public int hideBoard(int bseq) {
		return manager.hideBoard(bseq);
	}

	@Override
	public ArrayList<BoardDto> noHideBoards(String email) {
		return manager.noHideBoards(email);
	}

	@Override
	public ArrayList<BoardDto> noHideOurBoards(String email,int page) {
		return manager.noHideOurBoards(email,page);
	}

	@Override
	public int sendPhoto(PhotosDto dto) {
		return manager.sendPhoto(dto);
	}

	@Override
	public PhotosDto photoDetail(int imgseq) {
		return manager.photoDetail(imgseq);
	}

	@Override
	public int photoDel(int imgseq) {
		return manager.photoDel(imgseq);
	}

	@Override
	public int imgWriteBoard(PhotosDto dto) {
		return manager.imgWriteBoard(dto);
	}

	@Override
	public ArrayList<PhotosDto> getUserImgBoards(int parent) {
		return manager.getUserImgBoards(parent);
	}

	@Override
	public PhotosDto getImgBoard(int imgseq) {
		return manager.getImgBoard(imgseq);
	}

	@Override
	public int imgreply(PhotosDto dto) {
		return manager.imgreply(dto);
	}

	@Override
	public int imgReplyDel(int imgseq) {
		return manager.imgReplyDel(imgseq);
	}

	@Override
	public ArrayList<BoardDto> getUserBoardspaging(String email, int page) {
		return  manager.getUserBoardspaging(email,page);
	}

	@Override
	public int getOurBoardsCount(String email) {
		return manager.getOurBoardsCount(email);
	}

	@Override
	public int checkEmail(String email) {
		return manager.checkEmail(email);
	}

	@Override
	public int addMembers2(MembersDto dto) {
		return manager.addMembers2(dto);
	}

	@Override
	public int message(MessageDto dto) {
		return manager.message(dto);
	}

	@Override
	public ArrayList<MessageDto> sendMessagebox(MessageDto dto) {
		return manager.sendMessagebox(dto);
	}

	@Override
	public ArrayList<MessageDto> receiveMessagebox(MessageDto dto) {
		return manager.receiveMessagebox(dto);
	}

	@Override
	public int deleteMessage(MessageDto dto) {
		return manager.deleteMessage(dto);
	}

	@Override
	public int deleteMessage2(MessageDto dto) {
		return manager.deleteMessage2(dto);
	}

	@Override
	public int senddel(int mseq) {
		return manager.senddel(mseq);
	}







	
}
